Quick Integration for Busy Researchers • 15-30 minutes setup
Copy entire module to /research/haptic-technology/ → Done
# Your site structure your-site/ ├── research/ │ └── haptic-technology/ # ← Drop the entire module here │ ├── index.html │ ├── assets/ │ └── ...
Integrate into existing pages using iframe or direct embedding
Trigger module as full-screen overlay from existing content
<a href="/research/haptic-technology/">Haptic Research</a>
Header Integration (replace existing header):
<!-- Replace the <header class="site-header"> section with: -->
<header class="site-header">
<div class="container">
<nav>
<a href="/" class="logo">Your Lab Name</a>
<ul class="nav-links">
<li><a href="/people">PEOPLE</a></li>
<li><a href="/research">RESEARCH</a></li>
<li><a href="/publications">PUBLICATIONS</a></li>
<li><a href="/contact">CONTACT</a></li>
</ul>
</nav>
</div>
</header>
<div class="research-showcase">
<iframe src="/research/haptic-technology/"
width="100%"
height="800px"
frameborder="0"
allow="autoplay">
</iframe>
</div>
<!-- In your existing page -->
<div id="haptic-module-container">
<!-- Copy the main content section from index.html -->
<main class="main-content">
<div class="container">
<!-- Module content here -->
</div>
</main>
</div>
<!-- Add these before closing </body> -->
<link rel="stylesheet" href="/assets/haptic-module/style.css">
<script src="/assets/haptic-module/script.js"></script>
Trigger Button (in your existing page):
<button onclick="openHapticModule()" class="research-button">
Explore Interactive Haptic Research
</button>
Modal Implementation:
<!-- Add to your page -->
<div id="haptic-modal" class="modal-overlay" style="display: none;">
<div class="modal-content">
<button onclick="closeHapticModule()" class="close-btn">×</button>
<iframe src="/research/haptic-technology/" width="100%" height="90%"></iframe>
</div>
</div>
<style>
.modal-overlay {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0,0,0,0.9); z-index: 10000; display: flex;
align-items: center; justify-content: center;
}
.modal-content { width: 95%; height: 95%; position: relative; }
.close-btn { position: absolute; top: 10px; right: 20px; z-index: 10001; }
</style>
<script>
function openHapticModule() {
document.getElementById('haptic-modal').style.display = 'flex';
}
function closeHapticModule() {
document.getElementById('haptic-modal').style.display = 'none';
}
</script>
/* In style.css, find and replace: */
:root {
--primary-color: #29292A; /* Your brand color */
--accent-color: #555; /* Secondary color */
--background: #ffffff; /* Background */
--text-color: #333; /* Text color */
}
/* Replace Roboto with your fonts */
@font-face {
font-family: 'YourFont';
src: url('path/to/your-font.woff2');
}
body {
font-family: 'YourFont', 'Roboto', sans-serif;
}
Replace assets/icons/logo.png with your lab logo, or update:
<a href="/" class="logo">
<img src="path/to/your-logo.png" alt="Your Lab">
</a>
Automatic responsive design includes:
Test responsive behavior:
If using a CDN, update asset paths in script.js:
// Replace asset paths with CDN URLs
const animations = {
"1-2": "https://your-cdn.com/haptic-assets/state1-to-state2.webm",
// ... etc
};
Add to script.js in the transitionToState function:
// After successful transition
if (typeof gtag !== 'undefined') {
gtag('event', 'haptic_module_transition', {
'from_state': currentState,
'to_state': targetState,
'transition_type': 'user_initiated'
});
}
// Add custom tracking in script.js
function trackModuleUsage(eventName, data) {
// Your analytics implementation
console.log(`Haptic Module: ${eventName}`, data);
}
<!-- If you need broader support, add MP4 versions -->
<video>
<source src="animation.webm" type="video/webm">
<source src="animation.mp4" type="video/mp4">
</video>
script.js.webmstyle.css/research/haptic-technology/Questions? The module is designed to be self-contained and should work out-of-the-box with minimal configuration. Most issues are path-related and easily fixed by checking the browser console.